
public class TestMatcher02 {

	public static void main(String[] args){
        String str = "12Y34h56dAd7";
        String regex = "[a-zA-Z]+";
//        Pattern pat = Pattern.compile(regex);
//        Matcher mat = pat.matcher(str);
//        System.out.println(mat.replaceAll(":"));
        System.out.println(str.replaceAll(regex,"-"));
    }

}
